<template>
	<view class="content">	
	    <!-- #ifdef MP-WEIXIN -->
	    <navbar :bgColor="bgColor" :btnColors='btnColor' title="个人资料" :isGoBack="true" :isNotice="true" :visible="true" ></navbar>
		<!-- #endif -->
		
		<view class="main">
			<view class="flex ml-20 mr-20 justify-between pb-25 tag_text" @click="setmemberbase()">
				<view class="flex text-lg">
					<text style="color: #333333;">个人信息</text>
				</view>
				<view>
					 <u-icon name="arrow-right" color="rgba(3, 31, 55, 0.6);" size="15"></u-icon>
				</view>				 
			</view>
		</view>
			
		<view class="main">			
			<view class="flex ml-20 mr-20 justify-between pb-25 tag_text" @click="agreement(2)">
				<view class="flex text-lg">
					<text>服务协议</text>
				</view>
				<view>
					 <u-icon name="arrow-right" color="rgba(3, 31, 55, 0.6);" size="15"></u-icon>
				</view>				 
			</view>
			
			
			<view class="flex ml-20 mr-20 justify-between pb-25 tag_text" @click="agreement(1)">
				<view class="flex text-lg">
					<text>隐私政策</text>
				</view>
				<view>
					 <u-icon name="arrow-right" color="rgba(3, 31, 55, 0.6);" size="15"></u-icon>
				</view>				 
			</view>
			
			<view class="flex ml-20 mr-20 justify-between pb-25 tag_text" @click="aboutus">
				<view class="flex text-lg">
					<text>关于我们</text>
				</view>
				<view>
					 <u-icon name="arrow-right" color="rgba(3, 31, 55, 0.6);" size="15"></u-icon>
				</view>				 
			</view>
		</view>	
		<view class="main">
			<view class="flex ml-20 mr-20 justify-between pb-25 tag_text"  @click="layout">
				<view class="flex text-lg">
					<text>退出登录</text>
				</view>
				<view>
					 <u-icon name="arrow-right" color="rgba(3, 31, 55, 0.6);" size="15"></u-icon>
				</view>				 
			</view>			
		</view>			
	</view>	
</template>

<script>
	export default {
		data () {
			return {
				...getApp().globalData.config,
				userInfo:{},
				show: false,
				set_sex:false,
				set_phone:false,
				nickName:'',
			    array: [{ name: '男' }, { name: '女' }],
				index: 0
			}			
		},
		onShow() {
		    this.userInfo=uni.getStorageSync('userInfo');
			this.nickName=uni.getStorageSync('userInfo').nickName;
			this.index=uni.getStorageSync('userInfo').gender;
		},
		
		methods:{	
			//个人信息
			setmemberbase(){
				this.$routers.router('/pages/pagesuser/member_set/member_base','navigateTo') 
			},
			// 协议
			agreement(type){
				this.$routers.router('/pages/pagesuser/agreement/index?type='+type,'navigateTo') 
			},
			//关于我们
			aboutus(){
				this.$routers.router('/pages/pagesuser/about/index','navigateTo') 
			},			
			//退出登陆
			layout(){
				let that=this
				uni.showModal({content: '确定退出吗？'}).then(res=>{
				  if(res.confirm){
					uni.clearStorageSync();	
					uni.showToast({
						title: '退出成功',
						duration: 3000
					});	
					setTimeout(function(){
						that.$routers.router('/pages/mine/index','switchTab') 
					},2000)
				  }
				})
			},
			
		},
		
	}
</script>

<style>
	@import "./index.css";
</style>